/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Mobilottery.Constants;

import Mobilottery.AppManager;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Image;

/**
 *
 * @author WindowsVista
 */
public class Consts
{

    public static class Screens
    {

        public static final int Login = 0;
        public static final int MainMenu = 1;
        public static final int NewGame1 = 2;
        public static final int NewGame2 = 3;
        public static final int MyGames = 4;
        public static final int MyGameInfo = 5;
        public static final int About = 6;
    }

    public static class UIConsts
    {

        public static Font FONT_PLAIN_LARGE;
        public static Font FONT_PLAIN_MEDIUM;
        public static Font FONT_PLAIN_SMALL;
        public static Font FONT_BOLD_LARGE;
        public static Font FONT_BOLD_MEDIUM;
        public static Font FONT_BOLD_SMALL;
        //
        public static Image IMAGES_LOGO;
        //
        public static Image IMAGES_MENU_NEW_GAME;
        public static Image IMAGES_MENU_MY_GAMES;
        public static Image IMAGES_MENU_ABOUT;
        //
        public static Image IMAGES_GAMESTATUS_WAITING_FOR_RESULT;
        public static Image IMAGES_GAMESTATUS_ENDED_WON;
        public static Image IMAGES_GAMESTATUS_ENDED_LOSS;
        //
        public static Image IMAGES_NEW_GAME;


        static
        {
            FONT_PLAIN_LARGE = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE);
            FONT_PLAIN_MEDIUM = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
            FONT_PLAIN_SMALL = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL);

            FONT_BOLD_LARGE = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE);
            FONT_BOLD_MEDIUM = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);
            FONT_BOLD_SMALL = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_SMALL);

            // get best image width & height (for list)
            Display display = AppManager.get_display();
            int w = display.getBestImageHeight(Display.LIST_ELEMENT);
            int h = display.getBestImageWidth(Display.LIST_ELEMENT);
            //System.out.println(w + "x" + h);

            try
            {
                IMAGES_LOGO = Image.createImage("/Mobilottery/Images/logo.png");

                IMAGES_MENU_NEW_GAME = Image.createImage("/Mobilottery/Images/menu_newgame.png");
                IMAGES_MENU_MY_GAMES = Image.createImage("/Mobilottery/Images/menu_mygames.png");
                IMAGES_MENU_ABOUT = Image.createImage("/Mobilottery/Images/menu_about.png");

                IMAGES_GAMESTATUS_WAITING_FOR_RESULT = Image.createImage("/Mobilottery/Images/GameStatus_WaitingForResult.png");
                IMAGES_GAMESTATUS_ENDED_WON = Image.createImage("/Mobilottery/Images/GameStatus_EndedWon.png");
                IMAGES_GAMESTATUS_ENDED_LOSS = Image.createImage("/Mobilottery/Images/GameStatus_EndedLoss.png");

                IMAGES_NEW_GAME = Image.createImage("/Mobilottery/Images/newgame.png");
            }
            catch (Exception ex)
            {
            }
        }
    }

    public static class Urls
    {

        //private static String ServerUrl = "http://www2.mta.ac.il:8080/~samiemun/";
        public static String ServerUrl = "http://localhost:8080/service/";
        //
        public static String Login = ServerUrl + "wsclient.jsp?operation=login";
        public static String NewGame = ServerUrl + "wsclient.jsp?operation=newgame";
        public static String MyGames = ServerUrl + "wsclient.jsp?operation=mygames";
        public static String Participate = ServerUrl + "wsclient.jsp?operation=participate";
    }
}
